<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <title></title>
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport"
        content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all" />
</head>

<body layadmin-themealias="default">
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body" pad15="">
                        <div class="layui-form" wid100="" lay-filter="">
                            <input type="hidden" name="user" value="{$user}" />
                            <input type="hidden" name="room_id" value="{$room_id}">
                            <div class="layui-form-item">
                                <label class="layui-form-label">回复用户名</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="name" value="{:Lang('reply_nickname')}" class="layui-input"
                                        lay-verify="" />
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">回复内容</label>
                                <div class="layui-input-block">
                                    <div class="layui-form-mid ">
                                        <textarea name="content" id="content" cols="50" rows="10"></textarea>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block text-center">
                                    <button class="layui-btn" lay-submit="" lay-filter="user-edit">
                                        确认
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="/layuiadmin/layui/layui.js"></script>
    <script>
        layui.config({
            base: "/layuiadmin/" //静态资源所在路径
            , version: "{:config('other.ui_version')}"
        }).extend({
            index: "lib/index", //主入口模块
        }).use(["index", "user", "form", "admin"], function () {
            var $ = layui.$,
                form = layui.form,
                admin = layui.admin;

            $("#close").on("click", function () {
                parent.layer.close(index);
            });

            form.on("submit(user-edit)", function (obj) {
                //提交
                layer.load();
                admin.req({
                    url: "/admin/chat/reply_pub",
                    data: obj.field,
                    success: function (res) {
                        let type = $('#actionType').val();
                        layer.closeAll("loading");
                        parent.layer.msg(res.msg, { icon: 1 });
                    },
                    complete: function () {
                        layer.closeAll("loading");
                    },
                });
                return false;
            });
        });
    </script>
</body>

</html>